// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 创建问题 POST /api/module/SmartMaths */
export async function smartMathsCreate(
  body: API.QuestionCreateInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result>('/api/module/SmartMaths', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 批量删除 DELETE /api/module/SmartMaths/${param0} */
export async function smartMathsBulkDeletes(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartMathsBulkDeletesParams,
  options?: { [key: string]: any },
) {
  const { ids: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartMaths/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 修改状态 PUT /api/module/SmartMaths/${param0}/${param1} */
export async function smartMathsUpdate(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartMathsUpdateParams,
  options?: { [key: string]: any },
) {
  const { id: param0, status: param1, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartMaths/${param0}/${param1}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 是否收藏 PUT /api/module/SmartMaths/Favorited/${param0} */
export async function smartMathsIsFavorited(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartMathsIsFavoritedParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/SmartMaths/Favorited/${param0}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 分页查询 GET /api/module/SmartMaths/Page */
export async function smartMathsPagination(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartMathsPaginationParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResult1QuestionOutputModel>('/api/module/SmartMaths/Page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询答案 GET /api/module/SmartMaths/Query/Answer/${param0} */
export async function smartMathsQueryAnswer(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.SmartMathsQueryAnswerParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Result1String>(`/api/module/SmartMaths/Query/Answer/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
